From f7ba08cc97cf599f6f2afe50ec9e619a8cccea46 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Sun, 4 Dec 2005 00:49:51 +0100 Subject: [PATCH] Use test ([) instead of expr to compare integers. expr $int1 '<' $int2 seems to be broken on some shells. Signed-off-by: Christian Limpach --- tools/examples/xen-hotplug-common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/examples/xen-hotplug-common.sh b/tools/examples/xen-hotplug-common.sh index 6a9df2d4d8..d4ebedf9e7 100644 --- a/tools/examples/xen-hotplug-common.sh +++ b/tools/examples/xen-hotplug-common.sh @@ -119,7 +119,7 @@ _claim_lock() local owner=$(_lock_owner "$lockdir") local retries=0 - while expr $retries '<' $LOCK_RETRIES + while [ $retries -lt $LOCK_RETRIES ] do mkdir "$lockdir" && trap "release_lock $1; sigerr" ERR && _update_lock_info "$lockdir" && return @@ -131,7 +131,7 @@ _claim_lock() retries=0 fi - if expr $retries '>' $LOCK_SPINNING_RETRIES + if [ $retries -gt $LOCK_SPINNING_RETRIES ] then sleep $LOCK_SLEEPTIME else -- 2.30.2